import React from 'react';
import { Carousel } from 'zarm';

function VCarousel(props: any) {
  const { data, autoplay } = props;
  return (
    <Carousel autoPlay={autoplay} onChange={e => {}}>
      {data.map((item: any, i: number) => {
        return (
          <div className="carousel__item__pic" key={+i}>
            <img src={item.url} alt="" draggable={false} />
          </div>
        );
      })}
    </Carousel>
  );
}

export default VCarousel;
